package com.mydiceplayer.widget;

import android.content.Context;
import android.util.AttributeSet;


public class VideoViewVitamio extends VideoView {

	private final float MAX_SPEED = 2.0f;
	private final float MIN_SPEED = 0.5f;
	
	public VideoViewVitamio(Context context) {
		super(context);
	}
	
	public VideoViewVitamio(Context context, AttributeSet attrs) {
		super(context, attrs);
	}
	
	public VideoViewVitamio(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	
	
	public boolean isCanUpSpeed(float speed){
		
		if(speed >= MAX_SPEED){
			return false;
		}
		
		return true;
	}
	
	
	public boolean isCanDownSpeed(float speed){
		if(speed <= MIN_SPEED){
			return false;
		}
		
		return true;
	}
	
	public boolean upPlaySpeed(float speed){
		mMediaPlayer.setPlaybackSpeed(speed);
		return false;
		
	}
	public boolean downPlaySpeed(float speed){
		mMediaPlayer.setPlaybackSpeed(speed);
		return false;
		
	}
	
}
